import service from '@/utils/request'

// @Tags AccessoryNumberDocument
// @Summary 创建配件编号主档
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.AccessoryNumberDocument true "创建配件编号主档"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /accessoryNumberDocument/createAccessoryNumberDocument [post]
export const createAccessoryNumberDocument = (data) => {
  return service({
    url: '/accessoryNumberDocument/createAccessoryNumberDocument',
    method: 'post',
    data
  })
}

// @Tags AccessoryNumberDocument
// @Summary 删除配件编号主档
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.AccessoryNumberDocument true "删除配件编号主档"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /accessoryNumberDocument/deleteAccessoryNumberDocument [delete]
export const deleteAccessoryNumberDocument = (params) => {
  return service({
    url: '/accessoryNumberDocument/deleteAccessoryNumberDocument',
    method: 'delete',
    params
  })
}

// @Tags AccessoryNumberDocument
// @Summary 批量删除配件编号主档
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除配件编号主档"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /accessoryNumberDocument/deleteAccessoryNumberDocument [delete]
export const deleteAccessoryNumberDocumentByIds = (params) => {
  return service({
    url: '/accessoryNumberDocument/deleteAccessoryNumberDocumentByIds',
    method: 'delete',
    params
  })
}

// @Tags AccessoryNumberDocument
// @Summary 更新配件编号主档
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.AccessoryNumberDocument true "更新配件编号主档"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /accessoryNumberDocument/updateAccessoryNumberDocument [put]
export const updateAccessoryNumberDocument = (data) => {
  return service({
    url: '/accessoryNumberDocument/updateAccessoryNumberDocument',
    donNotShowLoading: true,
    method: 'put',
    data
  })
}

// @Tags AccessoryNumberDocument
// @Summary 用id查询配件编号主档
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query model.AccessoryNumberDocument true "用id查询配件编号主档"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /accessoryNumberDocument/findAccessoryNumberDocument [get]
export const findAccessoryNumberDocument = (params) => {
  return service({
    url: '/accessoryNumberDocument/findAccessoryNumberDocument',
    method: 'get',
    params
  })
}

// @Tags AccessoryNumberDocument
// @Summary 分页获取配件编号主档列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取配件编号主档列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /accessoryNumberDocument/getAccessoryNumberDocumentList [get]
export const getAccessoryNumberDocumentList = (params) => {
  return service({
    url: '/accessoryNumberDocument/getAccessoryNumberDocumentList',
    method: 'get',
    params
  })
}

// 获取自制旧-主档编号列表
export const getAccessoryNumberDocumentListOnlyAccessoryNum = (params) => {
  return service({
    url: '/accessoryNumberDocument/getAccessoryNumberDocumentListOnlyAccessoryNum',
    method: 'get',
    params
  })
}
// 配件汇入sap
export const partExportToSap = (params) => {
  return service({
    url: '/accessoryNumberDocument/exportToSap',
    method: 'get',
    donNotShowLoading: true,
    params
  })
}
